﻿<UserControl xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  x:Class="PairingMatrix.View.SettingsControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:View="clr-namespace:PairingMatrix.View" xmlns:AttachedProperty="clr-namespace:PairingMatrix.View.AttachedProperty" xmlns:Converter="clr-namespace:PairingMatrix.View.Converter" mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" Height="800" Width="650">
    <UserControl.Resources>
        <Converter:DateTimeToTextConverter x:Key="textToDateTimeConverter"/>
    </UserControl.Resources>
    
    <Grid x:Name="LayoutRoot" >
        
        <Rectangle RadiusX="20" RadiusY="20" StrokeThickness="3" Stroke="#FF6D823B" Fill="#FF9BBB57"/>
        <StackPanel>
            <Rectangle Stroke="White" Width="50" Height="2" VerticalAlignment="Top" Margin="0,20,0,0"/>
            <Grid Margin="20,20,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="250"/>
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="30"/>
                    <RowDefinition Height="30"/>
                    <RowDefinition Height="30"/>
                    <RowDefinition Height="30"/>
                    <RowDefinition Height="30"/>
                    <RowDefinition Height="30"/>
                </Grid.RowDefinitions>
                <TextBlock Text="General" Foreground="White" FontFamily="Fonts/Fonts.zip#Consolas" FontSize="20" />
                <TextBlock Text="Urgency for 1 Pointer:" Grid.Column="0" Grid.Row="1"  Foreground="White" FontFamily="Fonts/Fonts.zip#Consolas" FontSize="15" Margin="20,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
                <TextBlock Text="0 days" Grid.Column="1" Grid.Row="1"  Foreground="White" FontFamily="Fonts/Fonts.zip#Consolas" FontSize="15" Margin="10,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
                <Rectangle Grid.Column="1" Grid.Row="1"  Fill="LightBlue" Height="20" Width="20" Margin="65,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom" />
                <TextBox x:Name="good" Text="{Binding Path=Point1MappingToNotUrgent, Mode=TwoWay}" Margin="105,0,0,0" Height="20" AttachedProperty:BindingHelper.UpdateSourceOnChange="True"  Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="15" />
                <TextBlock Text="days" Grid.Column="1" Grid.Row="1"  Foreground="White" FontFamily="Fonts/Fonts.zip#Consolas" FontSize="15" Margin="125,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom" />
                <Rectangle Grid.Column="1" Grid.Row="1"  Fill="Orange" Height="20" Width="20" Margin="170,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom" />
                <TextBox x:Name="bad" Text="{Binding Path=Point1MappingToUrgent, Mode=TwoWay}" Margin="210,0,0,0" Height="20" AttachedProperty:BindingHelper.UpdateSourceOnChange="True"  Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="15" />
                <TextBlock Text="days" Grid.Column="1" Grid.Row="1"  Foreground="White" FontFamily="Fonts/Fonts.zip#Consolas" FontSize="15" Margin="230,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom" />
                <Rectangle Grid.Column="1" Grid.Row="1"  Fill="Red" Height="20" Width="20" Margin="275,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom" />
                <TextBlock Text="Show days spent:" Grid.Column="0" Grid.Row="2"  Foreground="White" FontFamily="Fonts/Fonts.zip#Consolas" FontSize="15" Margin="20,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
                <CheckBox x:Name="showDateSpent" IsChecked="{Binding Path=ShowDaysSpentForProjectCards, Mode=TwoWay}" Margin="5,0,0,0" Height="20" AttachedProperty:BindingHelper.UpdateSourceOnChange="True"  Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="15" />
                <TextBlock Text="End of Curr. Iteration:" Grid.Column="0" Grid.Row="3"  Foreground="White" FontFamily="Fonts/Fonts.zip#Consolas" FontSize="15" Margin="20,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
                <TextBox x:Name="endDate" Text="{Binding Path=IterationEndDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" AttachedProperty:BindingHelper.UpdateSourceOnChange="True"  Grid.Column="1" Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="150" />
            </Grid>            
            <Rectangle Stroke="White" Width="50" Height="2" VerticalAlignment="Bottom" Margin="0,20,0,0"/>
            <Grid Margin="20,20,0,0" >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="200"/>
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="30"/>
                    <RowDefinition Height="30"/>
                    <RowDefinition Height="30"/>
                    <RowDefinition Height="30"/>
                    <RowDefinition Height="30"/>
                    <RowDefinition Height="30"/>
                </Grid.RowDefinitions>
                <TextBlock Text="Mingle" Grid.Column="0" Grid.Row="0" Foreground="White" FontFamily="Fonts/Fonts.zip#Consolas" FontSize="20" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
                <TextBlock Text="Username:" Grid.Column="0" Grid.Row="1"  Foreground="White" FontFamily="Fonts/Fonts.zip#Consolas" FontSize="15" Margin="20,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
                <TextBox x:Name="username" Text="{Binding Path=MingleUsername, Mode=TwoWay}" AttachedProperty:BindingHelper.UpdateSourceOnChange="True"  Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="200" />
                <TextBlock Text="Password:" Grid.Column="0" Grid.Row="2"  Foreground="White" FontFamily="Fonts/Fonts.zip#Consolas" FontSize="15" Margin="20,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
                <PasswordBox x:Name="password" PasswordChar="@" Password="{Binding Path=MinglePassword, Mode=TwoWay}" AttachedProperty:BindingHelper.UpdateSourceOnChange="True"  Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="200" />
                <TextBlock Text="Story wall url:" Grid.Column="0" Grid.Row="3"  Foreground="White" FontFamily="Fonts/Fonts.zip#Consolas" FontSize="15" Margin="20,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
                <TextBox x:Name="storyUrl" Text="{Binding Path=MingleStoryUrl, Mode=TwoWay}" AttachedProperty:BindingHelper.UpdateSourceOnChange="True"  Grid.Column="1" Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="200" />
                <CheckBox x:Name="storyUrlSync" Content="Bring all cards from Mingle on sync" Foreground="White" FontFamily="Fonts/Fonts.zip#Consolas" FontSize="12" IsChecked="{Binding Path=MingleStoryUrlBringAllCardsFromMingle, Mode=TwoWay}" AttachedProperty:BindingHelper.UpdateSourceOnChange="True"  Grid.Column="1" Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="200" Margin="210,0,0,0" />
                <TextBlock Text="Regression wall url:" Grid.Column="0" Grid.Row="4"  Foreground="White" FontFamily="Fonts/Fonts.zip#Consolas" FontSize="15" Margin="20,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
                <TextBox x:Name="regressionUrl" Text="{Binding Path=MingleRegressionUrl, Mode=TwoWay}" AttachedProperty:BindingHelper.UpdateSourceOnChange="True"  Grid.Column="1" Grid.Row="4" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="200" />
                <CheckBox x:Name="regressionUrlSync" Content="Bring all cards from Mingle on sync" Foreground="White" FontFamily="Fonts/Fonts.zip#Consolas" FontSize="12" IsChecked="{Binding Path=MingleRegressionUrlBringAllCardsFromMingle, Mode=TwoWay}" AttachedProperty:BindingHelper.UpdateSourceOnChange="True"  Grid.Column="1" Grid.Row="4" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="200" Margin="210,0,0,0" />
                <TextBlock Text="DPS wall url:" Grid.Column="0" Grid.Row="5"  Foreground="White" FontFamily="Fonts/Fonts.zip#Consolas" FontSize="15" Margin="20,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
                <TextBox x:Name="dpsUrl" Text="{Binding Path=MingleDPSUrl, Mode=TwoWay}" AttachedProperty:BindingHelper.UpdateSourceOnChange="True"  Grid.Column="1" Grid.Row="5" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="200" />
                <CheckBox x:Name="dpsUrlSync" Content="Bring all cards from Mingle on sync" Foreground="White" FontFamily="Fonts/Fonts.zip#Consolas" FontSize="12" IsChecked="{Binding Path=MingleDPSUrlBringAllCardsFromMingle, Mode=TwoWay}" AttachedProperty:BindingHelper.UpdateSourceOnChange="True"  Grid.Column="1" Grid.Row="5" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="200" Margin="210,0,0,0" />
            </Grid>
            <Rectangle Stroke="White" Width="50" Height="2" VerticalAlignment="Bottom" Margin="0,20,0,0"/>
        </StackPanel>
    </Grid>
</UserControl>
